import { server } from "@/request/index";
export interface attrListType {
  id: string;
  name: string;
}
export interface attrList1Type extends attrListType {}
export interface attrList2Type extends attrListType {
  category1Id: number;
}
export interface attrList3Type extends attrListType {
  category2Id: number;
}
//平台属性 type
export interface attrValueListType {
  id: number;
  valueName: string;
  attrId: number;
}
export interface attrInfoType {
  id: number;
  attrName: string;
  categoryId: number;
  categoryLevel: number;
  attrValueList: attrValueListType[];
}


export const reqCategory1 = () => {
  return server.get<any, attrList1Type[]>("/product/getCategory1");
};
export const reqCategory2 = (category1Id: number) => {
  return server.get<any, attrList2Type[]>(
    `/product/getCategory2/${category1Id}`
  );
};
export const reqCategory3 = (category2Id: number) => {
  return server.get<any, attrList3Type[]>(
    `/product/getCategory3/${category2Id}`
  );
};

